package com.zdzx.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebURLConfigurer  implements WebMvcConfigurer{
	
	@Bean
	AuthFilter authFilter() {
		return new AuthFilter();
	}
	
	@Override
  public void addInterceptors(InterceptorRegistry registry) {
	  registry.addInterceptor(authFilter()).addPathPatterns("/**").excludePathPatterns("/webjars/**").excludePathPatterns("/swagger-resources**");
  }

}
